<?php
/*
 * @author qianfunian
 */
require('./configs/config.php');
require './common/users.class.php';
session_start();
include 'header.php';
if($_SERVER['REQUEST_METHOD']=='POST')
{
	extract($_POST);
	if(Users::login($db,$username, $password))
	{
		$_SESSION['user'] = $username;
		header("Location:index.php");
	}else
	{
		echo "no";
	}
}
$smarty->display('login.tpl');